import java.util.Scanner;

public class RectangleCalculator {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        
        // 提示用户输入两次值
        System.out.println("请输入矩形的长:");
        double length = scanner.nextDouble();
        
        System.out.println("请输入矩形的宽:");
        double width = scanner.nextDouble();
        
        // 打印用户输入的结果
        System.out.println("您输入的长是: " + length);
        System.out.println("您输入的宽是: " + width);
        
        // 计算矩形的面积和周长
        double area = length * width;
        double perimeter = 2 * (length + width);
        
        // 保留两位小数输出结果
        System.out.println("矩形的面积是: " + String.format("%.2f", area));
        System.out.println("矩形的周长是: " + String.format("%.2f", perimeter));
        
        scanner.close();
    }
}